Distributed control system for powder coating system

ABSTRACT

A powder coating control system comprising a plurality of gun controls associated with a like plurality of powder spray guns. Each of the gun controls stores a plurality of presets spray parameters. Each of the gun controls responds to part identification signals and part position signals to select in real time one of the stored presets of spray parameters and trigger its respective powder spray gun ON and OFF to apply a powder coating to the moving part in accordance with the selected set of spray parameters. The control system further permits a gun purge cycle to be programmed either before or after the powder coating process is executed. The control system automatically initializes and brings each of the gun controls to an operable state on-line with the system control.

This application is a continuation application of U.S. Ser. No.09/198,358, entitled "Distributed Control System For Powder CoatingSystem", filed Nov. 24, 1998, now U.S. Pat. No. 6,017,394, which in turnis a continuation application of U.S. Ser. No. 08/896,696, filed Jul.18, 1997, now U.S. Pat. No. 5,843,515, which in turn is a divisionalapplication of U.S. Ser. No. 08/320,882, filed Oct. 5, 1994, now U.S.Pat. No. 5,718,767.

FIELD OF THE INVENTION

The present invention relates generally to a powder coating system andmore particularly to a distributed control system providing a guncontrol for each spray gun which selects a particular one of a pluralityof stored sets of powder dispensing parameters and independentlycontrols the triggering of its powder spray gun.

BACKGROUND OF THE INVENTION

A powder coating system sprays an electrostatically charged airbornepowder within an enclosure or booth containing the part or article to becoated. The electrostatic potential between the powder and the articlecauses the powder to be attracted to and move into contact with thesurface of the article. The deposited powder is then heated so that itflows and hardens on the surface on which it has been deposited.

The present invention relates to two areas of powder spray control.First is the selection and control of certain spray parameters, forexample, the powder flow air pressure, the atomizing air pressure andpattern air pressure, if required. In addition, with corona type sprayguns, an electrostatic voltage is selected and supplied by an internalpower supply. The second area of powder spray control is gun triggering,that is, when the spray gun is turned ON and OFF, in relation to partstraveling through the spray booth. In the most basic systems, the airpressures and electrostatic voltage are controlled by manually settingrespective pressure regulators and a power supply, and the guntriggering is also manually controlled.

Some systems have been developed that automate the gun triggering. Forexample, the "SMART SPRAY®" gun controller which is manufactured andsold by Nordson Corporation of Amherst, Ohio, the assignee of thepresent invention, uses a microprocessor based gun controller incombination with manually set pressure regulators to automaticallycontrol the spray gun triggering. The gun controller operates withphotodetectors in the spray booth to provide gun triggering in differentspray booth zones. Either a conveyor feedback transducer or controltimer is used with the photodetectors to detect the presence of a partas well as its front and rear edges as it travels through the booth, andthe gun controller triggers the gun ON and OFF in response to thephotodetectors sensing part presence. However, the spray parametersremain constant unless they are manually changed by the operator.

In other systems, a programmable logic controller ("PLC" is used as acentralized powder spray system control in association withphotodetectors and a conveyor feedback transducer. The photodetectorsand a feedback transducer from the conveyor sense the presence andidentity of different parts, respectively, to be coated, as well as linegaps between successive parts on the conveyor. The PLC can beoperatively connected to voltage to pressure transducers for selectingthe desired powder air flow, atomizing air and pattern air pressures.The centralized PLC turns selected spray guns ON or OFF as a function ofthe part identified and line gaps between parts.

While the above systems have performed satisfactorily, they utilize acentralized controller or PLC which singularly controls the triggeringof each of the spray guns, and further, singularly controls each ofpressure regulators and each of the power supplies for each of the guns.This centralized system control configuration has a disadvantage ofrequiring extensive wiring within the painting facility much of whichmust be done upon installation at the user's site. Moreover, a PLC isnot adept at performing complex arithmetic operations and handling morecomplex data structures. PLC's have the further disadvantage of onlyproviding a limited amount of process status information to the operatoror other analytical devices. Furthermore, the use of a PLC as thecentralized control system has a further disadvantage in that it isdifficult and expensive to change the electrical configuration of thecontrol system. Also, there is no redundancy in a centralized PLCcontrol system and any electrical failure within the PLC will terminatethe operation of the entire coating system.

Still further, because the single centralized PLC must serially processdata for each of the powder dispensers, there is a further disadvantagein that the processing bandwith, that is, the real time window in whichthe PLC can dedicate to processing data for a particular powder spraygun is relatively small. Therefore, more comprehensive control of thepowder spray cycle is very difficult. For example, with a centralizedcontrol, a gun purge cycle to clean the dispensing hose and spray gun isnot programmable. When the spray gun is triggered ON, powder is pumpedfrom the powder source, through a dispensing hose up to thirty feet longand then through the spray gun. When the spray gun is triggered OFF, thefluidizing air pressure in the dispensing hose is terminated; andtherefore, the powder in the dispensing hose separates from itstransport air and often settles and collects in lumps or clumps in thehose. When the spray gun is again triggered ON, the powder lumps aresprayed in an uneven manner. With the prior control systems, a gun purgecycle is manually controlled by the operator when it is required.

Finally, as the system size, in terms of the number of powder dispensersand spray guns increases, the added complexities of using a singlecentralized PLC cause its costs to increase substantially.

SUMMARY OF THE INVENTION

To overcome the disadvantages described above and to provide a highlyflexible control system with capabilities not previously found incentralized powder coating control systems, the present inventioneliminates the centralized control of all of the spray gun functions andprovides a powder coating control system wherein control is distributedin a new and more efficient manner, thereby minimizing of wiring withinthe powder spray booth. The triggering and selection of spray parametersof each of the powder spray guns within the control system of thepresent invention is independently and individually controlled by itsown gun control so that each gun is capable of more comprehensive powdercoating process control. Therefore, the control system of the presentinvention has greater flexibility and reliability with less complexwiring. The control system of the present invention is particularlybeneficial in being able to select different sets of powder dispensingparameters on-line and in real time to make the powder coating processmore efficient and cost effective.

According to the principles of the present invention and in accordancewith the described embodiments, a powder coating system includes aplurality of powder spray guns disposed with respect to an article to becoated. Each of the powder spray guns is connected to its own guncontrol which stores a set of spray parameters and triggers its spraygun ON and OFF to apply a powder coating in accordance with the storedspray parameters. A communications network is in electricalcommunication with the plurality of gun controls. Providing a controlfor each powder spray gun results in a control system that is modular,highly flexible and provides a more comprehensive powder coating processcontrol. A dedicated control for each powder spray gun has the advantageof being able to report more process status information to the operatorcontrol, thereby permitting more comprehensive statistical processcontrol as well as more sophisticated automatic diagnostic procedures.The communications network advantageously simplifies the wiring betweencontrol components within the coating system, thereby reducing the costof installation. With multiple controls, a failure of one control doesnot necessarily require the powder coating operation be completely shutdown thereby providing further advantages in efficiency and costsavings.

In a further embodiment of the invention the powder coating systemincludes a sensor responsive to a conveyor moving the part past thespray gun which can be used to provide system signals representingfirst, a change in the position of the part, and second, a physicalcharacteristic of the part. Therefore, the spray parameters may bechanged in real time as one or more parts or portions of parts are movedthrough the spray booth.

In another embodiment, each of the gun controls in the powder coatingsystem includes a network interface, a memory for storing sets of sprayparameters, a digital to analog converter and a processor for triggeringits respective spray gun ON and OFF to apply a powder coating inaccordance with the stored set of spray parameters. In a still furtherembodiment, the powder system control includes a system controlconnected to the communications network for providing data to andreceiving data from the gun controls.

In another aspect, the invention includes a method of applying a powdercoating on a part moving with respect to powder spray guns by storing aplurality of presets of spray parameters in each of a number of guncontrols connected to a like number of powder spray guns. The part to becoated is detected and the appropriate gun controls are activated toselect a preset of gun operating parameters as a function of detectingthe part. The above method can be implemented by each of the guncontrols selecting different presets of spray parameters in response todetecting different physical characteristics of one or more of the partsor portions of the parts. In a further aspect of the above method, thedifferent presets of spray parameters are detected in response todetecting changes of position and different physical characteristics ofthe one or more parts moving with respect to the powder spray guns.

In another embodiment of the invention, a gun purge cycle isprogrammable and automatically executed as part of a standard powderspraying process. With a tribo gun, in which the electrostatic charge iscreated by the static electricity of the powder flowing through thespray gun, it has been found that purging is desirable prior to theexecution of a powder spraying process. With the present invention, apurge-on cycle may be programmed to automatically purge only the spraygun after the part has been detected but prior to the part arriving atthe spray gun. Further, at the end of a powder spraying process, apurge-off cycle may be programmed to use pressurized air toautomatically clean the powder dispensing hose and the spray gun ofexcess powder. Consequently, the invention provides an automatic powderspray cycle that prevents the surging and spitting of undispensed powderat the start of powder dispensing cycles. Therefore, another advantageof the invention is that, for the first time, a powder dispensingprocess can be programmed that changes powder spray parameters in realtime.

In a still further embodiment, the invention includes a method ofoperating a powder coating system in which the plurality of gun controlsare automatically initialized and brought on-line in a fully operablestate without any operator intervention. The control system has thecapability of detecting when one gun control is replaced by another, orwhen a new gun control is added to the system. Consequently, the methodprovides a significant savings in system downtime and operator time thatwould be otherwise required to initialize the gun controls.

The above methods of operating a powder coating system permit a highlyflexible powder coating process in which the operating parameters may bequickly changed on-line in real time with the advantage of providing amore uniform powder coating and a more efficient powder coating process.These and other objects and advantages of the present invention willbecome more readily apparent during the following detailed descriptionin conjunction with the drawings herein.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram of the powder coating system of thepresent invention.

FIG. 2 is a schematic block diagram of the system control illustrated inFIG. 1.

FIG. 3 is a set of flowcharts illustrating the general operation andinterrelationship between the controls within the powder dispensingcontrol system of the present invention.

FIG. 4 is a flowchart of the main reset routine being executed in eachof the gun controls of the present invention.

FIG. 5 is a flowchart of an initialize subroutine executed by the mainreset routine of FIG. 4.

FIG. 6 is a flowchart of the event processor subroutine executed by themain reset routine of FIG. 4.

FIG. 7 is a flowchart of a track part subroutine executed by the eventprocessor subroutine of FIG. 6.

FIG. 8 is a flowchart of a trigger subroutine executed by the track partsubroutine of FIG. 7.

FIG. 9 is a flowchart of the main processing loop executed by thegateway control within the system control of the present invention.

FIG. 10 is a flowchart of the gun control node initialize subroutineexecuted by the main processing loop of FIG. 9.

FIG. 11 is a flowchart of a process sign-on message subroutine executedby the gun control node initialize subroutine of FIG. 10.

FIG. 12 is a schematic illustration of the relationship of portions of apart having different physical characteristics to components within thepowder coating system.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 illustrates a preferred embodiment of the powder coating system10 of the present invention. The system 10 includes a powder spray booth12 shown in phantom in which an article or part 14 to be coated ismechanically supported on a conveyor 16. A powder coating iselectrostatically deposited on the part 14 and is subsequently heated tocause the powder coating to flow together and harden on surfaces of thepart. The powder is sprayed on to the part from an electrostatic powderspray gun 18. Other powder spray guns 22, 24 are also located in thepowder spray booth 12 at different locations to spray, either at thesame or different elevations, different portions of the same part, or,different parts at the same or different elevations, or, differentsurfaces, etc.

In a well known manner as is described in the Gimben, et al. U.S. Pat.No. 5,167,714, assigned to the assignee of the present invention,pressurized air, such as "shop air" is dried and distributed to an airdistribution and flow control panel or air source 26. The dried air issupplied in air lines 23, 25 to voltage to pressure transducers, orregulators, 130 and 132. The powder flow transducer or regulator 130supplies air at a regulated pressure for powder flow in air line 27 to apowder source 28. If a tribo gun is being used, the atomizing airtransducer or regulator 132 supplies air at a regulated pressuredirectly to the gun. If a corona spray gun is being used, the atomizingair transducer supplies air at a regulated pressure to a powder pump(not shown) in th e powder source 28 in air line 29 as illustrated inFIG. 1. The powder source 28 includes a bulk powder source (not shown)in which the powder is fluidized by air supplied thereto in air line 31from the air source 26. The powder is pumped from the bulk powder sourceby the powder pump to a cyclone and sieve unit (not shown) generallymounted on top of a feed hopper (not shown), all of which are within thepowder source 28. The powder is separated from the transport air in thecyclone, is then cleaned in the sieve and deposited into the powder feedhopper. The feed hopper is also connected to the air source 26 so thatthe powder therein is maintained in a fluidized state prior to beingpumped from the powder source 28, through a powder dispensing hose 30 tothe powder spray gun 18. Sprayed powder which is not deposited on thepart is recovered in the spray booth, cleaned and recycled to the powersource 28 by mechanisms which are not shown, but are known in the art.

The spray booth control system 32 includes a system control 34 which isdirectly responsive to devices in the spray booth 12. The system control34 is connected to a plurality of gun controls 38, 40, 42 associatedwith respective powder spray guns 18, 22, 24 over a communicationsnetwork 44. Any of the powder spray guns 18, 22, 24 may be mounted onmotion controls 55, for example, oscillators or reciprocators, which areactivated by the system control 34 in response to motion of the part 14through the spray booth 12. Further, as is well known, a programmablelogic control ("PLC") 52 within system control 34 provides actuationsignals to, and is responsive to input signals fed back from boothdevices 58. The booth devices include those devices associated with thespray booth that are necessary for and inherent within the powderspraying process per se. For example, the PLC operates to turn ON andOFF booth devices, such as, sieve motors, exhaust fans, solenoids, etc.;and the PLC receives input or feedback signals from devices such aspush-buttons, interlocks, limit switches, overhead switches, firedetection devices 59, etc. The fire detection devices 59 are typicallyprovided by a combination of ultraviolet and infrared detectors.

The various components within the system control 34 are shown in moredetail in FIG. 2. A part position control ("PPC") 50 includes a twistedpair transceiver network interface 60 which is part of thecommunications link with the PPC processor 61. The PPC processor 61 ispreferably implemented using a "NEURON CHIP" 3150 processor commerciallyavailable from Motorola, of Phoenix, Ariz. Development tools andsoftware for the "NEURON CHIP" processor are commercially available fromEchelon Corporation of Palo Alto, Calif. The PPC processor 61 receivesdigital binary signals from opto-isolator interface circuits 62, which,in turn, have inputs connected to an output from the PLC 52 and thequadrature output of the conveyor encoder 46. The PPC 50 also has amemory 63 including EPROM and RAM which is connected to the processor 61by an address/data bus 64. The PPC 50 functions to create part positionsignals for distinctive encoder counts in response to the motion of theconveyor and to transfer a part identity and part position signal orencoder count across the communications network 44 to all of the guncontrols 38, 40, 42. The encoder 46 provides first system signals, thatis, an output pulse or count, with successive incremental displacementsof the conveyor 16. The encoder is preferably "ACCU-CODER" encoder withquadrature outputs commercially available from Encoder Products Co. ofSandpoint, Ind.

The PLC 52 is typically implemented using a Model PLC 5 commerciallyavailable from Allen-Bradley of Milwaukee, Wis. Such a control typicallyincludes digital input/output ("I/O") interface circuits 66, whichreceive and provide binary signals from and to, respectively, thevarious controls and devices 46, 54, 55, 58, 59 within the spray booth12. The PLC 52 is responsive to the states of the photosensor, orphotodetector array 54 detecting the presence of the part, or physicalcharacteristic of the part, to create second system signals, that is, acorresponding part identification signal or code, and transmits the partidentification code to the PPC 50 for subsequent transmission to the guncontrols 38, 40, 42.

An operator control 36 is connected to the PLC 52 by means of a PLCcommunications card 70. The operator control 36 is preferablyimplemented with a commercially available industrial computer 71 of thetype having a 486 processor such as a Model 9450 from Xycom Inc. ofSaline, Mich. The PLC communications card 70 is typically supplied bythe manufacturer of the PLC 52 and is designed to be plug compatiblewith and provide a bidirectional communication link between the PLC 52and the personal computer comprising the operator control 36. Theoperator control further contains input/output ("I/O") devices 72 whichmay include push buttons, switches, a screen display, and other devicesthat allow and facilitate the loading of powder spray parameters andother data into the operator control 36 and display powder coatingprocess conditions to the operator. The I/O devices 72 may also includea modem or a network connection to again facilitate the transfer of datato and from the operator control 36. The network devices 72 may furtherinclude an interface to connect the operator control 36 to an externalpersonal computer 102. The computer 102 may be used for statisticalprocess control for the powder coating process or other functions. Theoperator control processor 71 is connected to the PLC communication card70, the I/O devices 72, memory 74, and a serial port 75 by means of astandard ISA bus 76. The 71 processor is preferably running a "WINDOWS""DOS" operating system. Within the "WINDOWS" environment, the "IN TOUCH"program commercially available from Wonderware of Irving, Calif. is usedto provide a man-machine interface.

The gateway central processing unit ("CPU") 80 is also preferably acomputer having, for example, a 486 processor executing a "DOS"operating system. The CPU 80 is connected to a standard ISA bus 88which, in turn, is connected to a serial port 86 and to various memorydevices, such as a floppy disk 90, nonvolatile flash EPROM 94. Thegateway control 56 communicates with the individual gun controls 38, 40,42 by means of a gateway processor 96 connected between the bus 88 and atwisted pair transceiver network interface 98. The gateway processor 96is preferably a "NEURON CHIP" 3150 digital processor that executes "MIP"software also commercially available from Echelon Corporation of PaloAlto, Calif. The purpose of the "MIP" software is to permit the gatewayCPU 80 to communicate with the "NEURON CHIP" processor 96. The gatewaycommunications processor 96 is contained on a circuit board that isavailable from Ziatech Corp. of San Luis Obispo, Calif. The gatewaycontrol 56 functions primarily as a system database and stores in thenonvolatile memory 94 a database that has the operational status of eachnetwork node, that is, each gun control 38, 40, 42. The databaseincludes up to 32 groups, or sets, or presets of spray parameters foreach gun control, system configuration data, etc. The gateway control 56also functions as a network manager and event processor which decodesvarious event states and creates associated messages, if required.

The operator control 36 communicates with the gateway control 56 over aserial communication line 82, connected between respective serial port75 in the operator control 36 and serial port 86 of the gateway control56. The operator control processor 71 and the gateway CPU 80 communicateby means of a low level protocol that simulates a fully duplexed RS-232serial bus communication between universal asynchronous receivertransmitters. That low level protocol defines the structure of packetsof data transferred over the serial bus between the receivertransmitters and the details of the communications protocol. That lowlevel protocol runs in both the operator control processor 71 and thegateway CPU 80 in order to move data between the serial ports 75, 86. Asecond higher level communications protocol, which is an applicationlevel interface for the low level protocol runs on the operator controlprocessor 71 and the gateway CPU 80 to interpret the commands which arecreated by the low level protocol. The higher level protocol controlsthe routing of data and control functions within the operator control 36and the gateway control 56.

The gateway control 56 communicates with the PLC 52 by a digital I/Ointerface 100 which is connected to the digital I/O interface 66 withinthe PLC 52. The digital I/O interfaces 66, 100 are connected by a groupof parallel lines that provide discrete signals between the PLC 52 andthe gateway control 56. Therefore, the PLC 52 can respond to a conditionit senses within the spray booth 12 and provide a remedial commandsignal to the gateway control 56 for immediate action.

Referring to FIG. 1, the communications network 44 is a local operatingnetwork ("LON"), which is efficient at transmitting small packages ofdata at high speeds between the PPC 50 and the gun controls 38, 40, 42,as well as between the gateway control 56 and the gun controls 38, 40,42. The communications network or LON 44 includes the commerciallyavailable "NEURON CHIP" 3150 processors, which comprise the PPCprocessor 61, the gateway processor 96, and gun control processor 106;the twisted pair transceiver network interfaces 60, 98, and 104; and thecommunication media or link 57 which is preferably a twisted pair cableand carries the communications between the network interfaces. The LON44 is supported by the "LONWORKS™" technology commercially availablefrom the Echelon Corporation. Data is exchanged across the media 57 andbetween the transceivers 60, 98, 104 and respective "NEURON CHIP"processors 61, 96, 106 in accordance with a "LONTALK" communicationsprotocol being executed by communications software running in the"NEURON CHIP" processors 61, 96 and 106.

The gun controls 40, 42 are identical to the gun control 38 shown indetail. The gun control 38 is connected to the communications network 44by means of a twisted pair transceiver network interface 104 and a guncontrol processor 106 comprising a "NEURON CHIP" 3150 processor as notedabove. Address switches 108 are set by an operator to a selectable,unique address that identifies the physical designation of the guncontrol itself, and the physical designation or the identity of thephysical location of the connector receiving the circuit boardcontaining the gun control 38. The switch buffer 110 provides aninterface buffer for the switch settings. LED drivers 112 are connectedto LED's 114, which provide visual signals to indicate the gun is turnedON or triggered, the auto, manual, and off line modes of operation, acommunications fault, a control hardware fault, etc. Generally, it ispreferable to continue the powder spraying process as long as possible;and therefore, the LED's provide a fault indication to the operator whothen may determine the appropriate remedial action. Control 38 hasmemory 116 which includes a 64 K×8 EPROM and a 32×8 RAM connected to thedispenser controller 106 over an 8 bit bus 118.

The gun control processor 106 transmits an electrostatic voltageparameter from memory 116 over a serial peripheral interface ("SPI") bus120 to one of a group of 8 bit serial digital analog converter ("DACS")122. One of the DACS 122 provides a current signal to power amp 124,which provides an amplified current at an appropriate voltage level tothe KV generator 126 mounted to corona type spray gun 18. The KVgenerator 126 is effective to provide the desired electrostatic chargeto the powder being dispensed by the spray gun 18. Tribo type powderspray guns may also be used. The connection of the powder spray guns andthe gun controls includes an extra signal line that provides a binarysignal indicating whether the powder spray gun is either a corona typeor tribo type of gun. The power amp 124 also provides a current feedbacksignal to the analog to digital converter and scaling circuit ("A/Dconverter") 128 as a function of the current signal supplied to the KVgenerator 126. With a tribo type of gun, a desired current feedback isincluded in the preset spray parameters in place of the electrostaticvoltage preset for the corona type gun. The feedback current is selectedto be in a range greater than preset current feedback and less than 20microamps. In the case of tribo type guns, the processor 106 receivesthe output from the A/D converter 128 to determine whether the currentfeedback signal is within predetermined limits.

During a powder dispensing process, the gun control processor 106 willalso read from the memory 116 various other parameters, for example,atomizing air pressure, powder flow pressure, and pattern air pressure.Those parameters are converted into analog signals by the DACS 122 andprovided to the appropriate transducers, for example, the powder flowair transducer 130 and the atomizing air transducer 132. The transducers130, 132 are preferably voltage to pressure transducers available fromNordson Corporation as Part No. 159 686. The transducers 130, 132function as pressure regulators to provide a regulated output pressureto the powder pump in the powder source 28 as a function of the inputsignal voltage received from the DACS 122. Those regulated pressures areutilized for their appropriate purpose in a manner well known in theart. In addition, the transducers 130, 132 provide buffered analogvoltage pressure feedback signals as a function of their regulatedoutput pressures to the AID converter 128 and a binary fault signal inthe event of a transducer malfunction to the alarm fault circuit 134.

Each atomizing air transducer either is connected to a powder pump of arespective corona spray gun, or is connected to the rear of a tribo typeof spray gun. The atomizing air transducers either control the densityof the powder being conveyed from the powder pump in a corona gun, orthe velocity of the powder being discharged in a tribo type of gun. Eachpowder flow transducer is connected to a respective powder pump andcontrols the flow rate at which powder is supplied to the spray gun.Although not shown, a pattern air transducer may be connected to thespray gun to control the dispensing pattern of the powder.

FIG. 3 is a flowchart illustrating the general function and operation ofthe gun controls 38, 40, 42 the gateway control 56, the PLC 52, and thePPC 50. When power is applied to the controls, or upon a reset of any ofthe individual controls, each of the controls executes a respectiveinitialization process 200, 202, 204, 206. The initialization processwill vary somewhat with each control; but in general, initializationturns off all hardware outputs, clears default states and performsmemory checks and other hardware checks. The amount of diagnostictesting that is performed on a control reset is a matter of designchoice.

After the initialization process is completed, each of the gun controls38, 40, 42 at 208 sends a sign-on signal to the gateway control. Uponreceiving the sign-on signal from each of the gun controls at 210, thegateway control at 212 sequentially processes each of the sign-onsignals and updates a status bit in the database within the gatewaycontrol indicating that communication is established with the respectivegun control associated with the sign-on signal. The gateway control 56then sends at 214 an on-line signal to the respective gun control. Inaddition, the gateway control at 216 begins to download the sprayparameters stored in the database associated with that gun control. Uponreceiving the on-line signal at 218, the gun control then beginsreceiving and storing the spray parameters which are being downloaded bythe gateway control. After all of the parameters have been downloaded at220, the gun control is ready to begin processing a part.

In the situation where a new part is being introduced to the spraybooth, no spray parameters may exist in the gateway control and theoperator may choose to run the system manually to determine which of theparameter values should be used to most efficiently process the part. Inthe manual mode, the control system tracks the part as it moves throughthe conveyor booth. The electrostatic charge, flow pressure, atomizingair pressure, and pattern air pressure may be manually selected; and thepowder spray gun manually operated. Once the spray parameters have beendetermined, the operator may then utilize the off-line mode to enterdata, for example, motion dependent spray parameters associated with aparticular part. In the off-line mode, the control system tracks thepart as it moves through the spray booth; however, the spray guns aredisabled, that is, they cannot be triggered ON while in the off-linemode. After all the spray parameters have been established anddownloaded to the gun controls, the operator switches to the auto modeduring which the part is automatically detected, identified, tracked andcoated as it moves through the spray booth. In response to motion of thepart through the spray booth, different sets of spray parameters at eachof the gun controls is selected; and powder is dispensed accordingly.During the auto mode, the operator is also able to use the operatorcontrol 36 to enter data. In any of the above modes, the gateway control56 detects data entered by the operator at 222 and processes that dataat 224. In executing the above modes of operation, the PLC 52 detects at226 and processes at 228 signals from the devices in the spray booth. Inaddition, the PLC detects at 238 and processes at 240 the states of thephotosensors 54 within the spray booth in order to determine theidentification of the part being processed.

Upon the PPC 50 receiving the quadrature encoder pulse and creating anencoder count at 234, the PPC reads at 236 the part identification codeprovided by the PLC 52. The PPC then at 237 transmits the partidentification code and encoder count across the communications network44 to the gun controls which are currently recognized as being on-lineby the gateway control 56. The gun controls at 244 detect the partidentification code and encoder count sent by the PPC 50, and each ofthe gun controls keeps track of the position of the part within thebooth relative to the detection of the part by the photodetectors. Eachof the gun controls then at 246 independently determines whether it hasa set of spray parameters associated with the part identified by thephotosensors, and if so, the gun control executes a powder coatingcycle.

If, during its operation, a gun control detects at 248 errors in theprocess, for example, one or more of the pressure feedbacks exceeds ahigh or low limit. The gun control will at 250 illuminate one or more ofthe LEDs on the gun control itself and send the error signal to thegateway control which sends the error signals to the operator control 36for display to the operator. The gun controls 38, 40, 42 will preferablydetect a pressure error when the feedback signal indicates that thepressure is, for example, 5 psi, above or below the preset pressureparameter. Other errors will be detected when the gun control does notinitialize properly, when other hardware faults are detected, when anemergency stop is detected, when an excessive number of encoder countshave been missed, etc.

In addition, the PLC at 242 detects whether data has been received fromthe operator control; and if so, the PLC processes that data at 243. ThePLC also detects other errors at 252 which are caused by problemconditions detected in the spray booth or improper or illogical operatorrequests or conditions, etc. Upon those errors being detected, the PLCat 254 updates the operator and gateway controls so that those errorstates can be respectively displayed to the operator and other actiontaken if necessary. The gateway control 56 determines at 256 whether anycommands have been received from the PLC. If so, gateway controlprocesses the PLC commands at 258. In addition, the gateway control at260 detects other errors, for example, errors in processing the partthat are received from the gun controls. Further, a communications errorbetween any of the gun controls 38, 40, 42 and the gateway control 56may result in the on-line status bit for one of the gun controls beingset to the off-line condition which will require a full resetting andreinitialization of the gun control in order to reestablish its on-linestatus. The error conditions detected at 260 by the gateway control areprocessed at 262 by either updating the database as required and/orsending the error signal to the operator control for display to theoperator.

FIGS. 4-8 are flowcharts illustrating the details of several programs orroutines being executed by the processors within the gun controls 38,40, 42. FIGS. 9-12 are programs or routines operating within the gatewayCPU 80 of the gateway control 56. One important feature of the inventionis the ability of the spray booth control system 32 upon a power up or areset to automatically initialize the gun controls 38, 40, 42 to a fullyoperable state and automatically connect the gun controls on-line overthe communications network 44 with the gateway control 56. Further, ifany circuit board containing a gun control is replaced by a differentcircuit board, the booth control system 32 automatically detects thereplacement board and brings the new gun control to an on-line operablecondition.

The interaction between the gun controls 38, 40, 42 and the gatewaycontrol 56 to automatically bring a gun on-line will be described withregard to FIGS. 4, 5, 9 and 10. The gun control reset or power-onroutine is illustrated in FIG. 4 and is initiated in response to powerbeing applied to the gun control or in response to a gun control resetbeing initiated by the operator or the control system. The generalinitialization process or subroutine 302 is illustrated in FIG. 5. Asshown at 352, the control first clears any fault states and in additionturns off hardware outputs. Next at 354, the gun control sets itsidentification in the switch buffer 110 equal to the state of theaddress switches 108. Thereafter, if, at 356, an auto test has beenselected by the operator, the auto test is executed at 358 to test theoperation of the transducers 130, 132. If no auto test has beenselected, the initialization subroutine continues at 360 to do otherdiagnostic hardware tests, such as memory checks, etc. After thehardware testing is complete, the initialize subroutine sets the nodemode to the start up mode at 362 and returns to the gun control resetroutine of FIG. 4. After initialization, the gun control at 304 sends asign-on message to the network manager function within the gatewaycontrol 56. The sign-on message includes a sign-on command code, the guncontrol identification established by the address switches 108, the typeof node represented by the gun control, the software versionidentification running within the gun control processor 106, and afixed, nonselectable 48 bit "NEURON CHIP" processor identification codeassigned by its manufacturer, the Echelon Corporation, for theparticular chip which is installed as the processor 106.

FIG. 9 is a flowchart illustrating the gateway processing loop that isrunning within the gateway CPU 80. Upon the application of power to thegateway control 56 or upon some other master reset command, aninitialize subroutine is executed at 552 which tests and initialize theoutputs, the memory, and other hardware associated with the gatewaycontrol 56. In addition, the initialize subroutine will call each of theother task subroutines within the gateway processing loop of FIG. 9 andinitialize each of those subroutines.

After initialization, the gateway control processing loop steps throughvarious subroutines as illustrated in FIG. 9 performing the networkmanagement tasks represented by the subroutines. For example, when thegateway control 56 and operator control 36 exchange data over the seriallink 82, the low level communications task 553 in the gateway processingloop is executed. At the same time, a the low level communications taskis executed in the operator control; and the gateway control eithertransmits data to or receives data from the operator control across theserial link 82 in accordance with the low level communications protocol.When appropriate, the gateway processing loop will also execute the highlevel communications task 555 which upon the receipt of data interpretsthe low level communications protocol commands and routes data andcontrol functions within the operator control. Prior to transmittingdata, the high level communications task 555 will from the data to betransmitted to the operator control create the necessary low levelcommunications commands required by low level communications task. Ahigh level communications subroutine or task also runs in the operatorcontrol 36 to interface with the low level communications protocolrunning therein.

When one of the gun control nodes sends a sign-on message across thecommunication network 44 to the gateway control 56, the network tasksubroutine 554 is executed within the gateway CPU 80 to control thequeuing and flow of incoming messages to the gateway control 56 from thevarious gun controls 38, 40, 42. In addition, the network variable tasksubroutine 556 is executed by the gateway CPU 80 to identify the type ofmessage being received by the gateway control. The message is validatedand then message processing is initiated. For example, the message mayrequire that new data be entered into the database. Alternatively, themessage may require that its content be forwarded on to either the PLC52 or the operator I/O 36.

In response to receipt of a sign-on message, the node initialize tasksubroutine 560 is executed to establish the communication link betweenthe gateway control 56 and each of the gun controls 38, 40, 42. Thedetails of the node initialized task subroutine 560 are illustrated inFIG. 10. Referring to FIG. 10, the node initialize process firstretrieves the current task state at 602 which is assumed to be the checkfor sign-on state. The process at 604 detects that state and executesthe check for sign-on subroutine 606. The sign-on subroutine 606sequentially increments through each node address in the system anddetermines whether a sign-on message has been transmitted across thecommunication network 44 by that node. If it detects a sign-on messagefor a particular node, the task state is set to the process sign-onstate, the sign-on state flag is reset, and a pointer is assigned to thesign-on message received. The initialize task subroutine detects theprocess sign-on state at 608 and executes a process sign-on messagesubroutine 610 as shown in FIG. 11.

Referring to FIG. 11, the process sign-on message subroutine goes to thefirst pointer assigned to a sign-on message and determines at 654whether the address switch identification within the sign-on messageexists within the database in the nonvolatile memory 94 of the gatewaycontrol 56. In some situations, an applications engineer or the operatormay use the operator control 36 to enter data into the database whichpreassigns a gun control identification which is then manually set inthe address switches 108. However, the identification code of theparticular "NEURON CHIP" processor used with the addressed gun controlis not known in advance by the engineer or operator. Therefore, when thegun control identification is assigned, an identification code of zerois entered into the "NEURON CHIP" processor identification field withinthe database. Consequently, if at 656, the process finds a zero entityin that field, it is assumed that the initialization process for thatparticular gun control is being executed for the first time. The processthen at 658 reads the node type contained within the sign-on messagefrom the gun control to validate that the node is a gun control node. Ifa different node type is detected, for example, the PLC node, a gatewaysystem error subroutine is executed at 660, and the initialization taskstate is set to the check for sign-on state at 662. If a valid node typeis detected at 658, the "NEURON CHIP" processor identification codecontained within the sign-on message is written into the database at 664in association with the address switch identification contained in thesign-on message. Next, at 666, the gun control or node network addressis written into the database; and at 668, the process sets theinitialization task state to establish node addressing so thataddressing variables may be downloaded to the gun control.

If the process at 656 detects that the "NEURON CHIP" processoridentification code is not equal to zero, the process assumes that thegun control has previously signed on to the system. Therefore, at 670the process determines whether the "NEURON CHIP" processoridentification code in the database for the switch identification isequal to the "NEURON CHIP" processor identification code contained inthe sign-on message. If it is, the process then at 672 checks the guncontrol installed status bit; and if the status flag indicates that theidentified gun control is installed, the process at 674 sets the taskstate to the node on-line state. As will be subsequently described, theon-line command is then transmitted to the gun control and the sprayparameters are downloaded.

If at 672 the subroutine determine that the installed status bitindicates that the gun control or node is not installed, then theprocess at 676 checks to determine whether the network node variableshave been downloaded and whether the network addressing for the guncontrol is correct. If not, the subroutine at 668 sets the initializetask state to establish network node addressing so that the correctnetwork addressing variables can be downloaded to the node.

If at 670 the "NEURON CHIP" processor identification code in thedatabase is not the same as the "NEURON CHIP" processor identificationcode contained in the sign-on message, the process assumes that the guncontrol circuit board containing the "NEURON CHIP" processor identifiedin the database has been replaced by a different gun control circuitboard which contains the "NEURON CHIP" processor identification code inthe sign-on message. The process then at 671 detects whether the statusbit associated with the sign-on address switch identification or codefound in the database is set to the installed state. If it is, thatmeans that the sign-on address switch code is a duplicate of an addressswitch identification already stored and installed in the database. Twogun controls cannot have the same address switch identifications; andtherefore, the if that condition is detected, a system error is set at660. If the process detects at 671 that the sign-on address switchidentification is not installed in the database, the process then at 658determines whether the sign-on message contains a valid node typeidentification. If it does not, a system error is set as previouslydescribed at 660. However, if a valid node type is detected at 658, the"NEURON CHIP" processor identification code in the sign-on message isloaded into the database at 664 along with the network address at 666;and the initialization task state is set to establish node addressing at668 so that the appropriate addressing and other variables may bedownloaded to the new "NEURON CHIP" processor. The process justdescribed covers those situations where a gun control is signing on forthe first time, where the gun control is signing on a second orsubsequent time, and where a gun control identified in the database hasbeen replaced with a new gun control.

The situation can also exist where a gun control is connected to thecommunication network 44 without any previous identification or entry ofdata associated therewith in the database. In that situation, theprocess at 654 will not find an address switch identity in the databasecorresponding to the address switch identity contained in the sign-onmessage; and the process at 678 again validates whether the sign-onmessage contains a node type associated with the gun control. If thenode type is not a gun control type, a gateway system error is set at660. If the node type is a gun control type, the process at 680allocates space within the database so that a new record associated withthe new gun control can be entered. At 664, the "NEURON CHIP" processoridentification code in the sign-on message is loaded into the databasewith the rotary switch identification; at 666, the node network addressis written into the database; and the process at 668 sets the initializetask state to establish node addressing. The above process as describedwith respect to FIG. 11 is effective to sign-on and enter into thesystem database within the gateway control, gun controls that areconnected to the communications network whether or not any previousinformation has been entered with respect to those gun controls.Consequently, the gateway control upon power up or a reset,automatically scans the network for the existence of gun controls andbrings those gun controls on-line in an operative state without anyintervention by an operator. In the absence of the above process, one ortwo persons would be required to manually identify and sign-on each ofthe gun controls.

Returning to FIG. 10, if as a result of executing the process sign-onmessage subroutine 610, an establish node addressing task state was set;that state is detected at 612; and a subroutine 614 is executed which iseffective to download from the gateway control 56 to the appropriate guncontrol nodes 38, 40, 42 addressing variables which are required forcommunication between the "NEURON CHIP" processor 106 associated withthe respective gun control and the "NEURON CHIP" processor 96 within thegateway control 56. In addition, those addressing variables are loadedinto the database within the gateway control 56 in association with therespective particular gun control. When the addressing mechanisms havebeen established and successfully downloaded to the gun control, theestablish node addressing subroutine sets the initialize task to theon-line state which is detected at 616 and which results in theexecution of a set node on-line subroutine 618. The set node on-linesubroutine 618 first creates a node on-line command and sends thaton-line command across the communication network 44 to the appropriategun control. If the subroutine detects any error in the communication ofthe on-line command to the gun control, a system error signal is set. Inaddition, any communication error resets the gun control installed sothat the status indicates that the gun control is not installed.Further, if in the execution of the subroutines of FIG. 10, a systemerror is generated, a report system error state is created which isdetected at 624; and the system error subroutine 626 reports the systemerror to the operator control and takes whatever other action isappropriate.

Returning to FIG. 4 after the gun control has sent the sign-on messageto the gateway control at 304, the gun control then checks at 306whether it has received the on-line command signal from the gatewaycontrol 56. If it has not, the process then determines whether a sign-ontimer has timed out at 308. If an on-line command signal is not receivedwithin the predetermined period of time determined by the sign-on timer,the process returns to re-execute the initialize subroutine at 302. Ifthe set node on-line subroutine 618 (FIG. 10) is executed in the gatewaycontrol 56 to provide the gun control with an on-line command signalprior to the sign-on timer expiring, the gun control reset subroutine ofFIG. 4 detects the on-line command at 306, sends an acknowledgement ofreceipt of the on-line command back to the gateway control and begins anevent processor routine 310. Upon receipt of the acknowledgement, theset node on-line subroutine 618 of FIG. 10 starts a heart beat counterfor that gun control node and also sets the initialize task state to thedownload parameters state. The download parameter state is detected at620, and a download parameters subroutine is executed at 622 which setsthe gateway main processing loop of FIG. 9 to run the node download tasksubroutine 558 thereby effectively ending the node initialize task 554.The node download subroutine running within the gateway CPU 80sequentially reads the spray parameters from the database associatedwith the gun control node and the gateway processor 96 transfers thespray parameters serially across the communication network 44 to therespective gun control.

The gun control processes the receipt of the spray parameters byexecuting the event processor routine 310 of FIG. 4 which is shown indetail in FIG. 6. Referring to FIG. 6, the event processor firstdetermines whether the download of the spray parameters is complete at402. If all of the spray parameters have been downloaded and received bythe gun control, the gun control sends a node ready message at 404 backto the gateway control 56. If the download of parameters is notcomplete, the event processor at 406 determines whether the sprayparameters represent new gun data. The spray parameters that arerequired to automatically operate the system, and that are input to thecontrol system using the manual control 36 are divided into two groupsof data.

The first group of data is referred to as gun data and is dependent onthe particular spray gun and its location within the spray booth. Gundata includes, for example, the pick off point which is the distancefrom the point at which the photo sensors 54 recognize the part to thespray gun location within the booth; and the current alarm high and lowlimits which are the maximum and minimum allowable feedback currents forthe gun. Also entered is a purge-on parameter which specifies the numberof encoder counts representing the duration of a gun purge cycle beforea part arrives in front of the gun, and a purge-off parameter specifyingthe duration in seconds of a gun purge cycle after an end of the part isdetected. Other gun data includes the purge flow pressure which is thepressure value to use during the purge-off cycle, and purge atomizingpressure which is the pressure value of the atomizing pressure during apurge-on cycle. If the spray parameters being downloaded represent gundata, the event processor at 408 updates the memory 94 within the guncontrol with the new gun data.

The gun control has the capability of storing up to 32 different groupsor presets of spray parameters. Since the different powder spray gunswithin the spray booth can be dispensing powder on portions of a part ordifferent parts that have different physical or geometriccharacteristics, for the most efficient and the highest quality powdercoating, the spray parameters for the guns must be adjusted and tailoredto the current physical characteristics of the part, or portion of thepart, onto which the powder is to be coated. Therefore, a mapping datatable for each spray gun is maintained in the nonvolatile memory 94 ofthe gateway control 56 that associates one of up to 255 differentprogrammable part identification codes to one of up to 32 differentpresets of spray parameters. It should be noted that the data tabledefining the relationships of the 255 programmable part identificationcodes to the 32 presets is treated as a single network variable. This isaccomplished by embedding the part identification code in the variabledata field in a predefined pattern so the gun control and gatewaycontrol can interpret the data field correctly. Similarly, the 32presets of spray parameters are also treated as a single networkvariable by embedding the preset identification in the data field andconstructing the data field in a predetermined pattern. If, at 410, theparameters downloaded represent a change to the mapping data table, theevent processor at 412 updates the mapping data table stored in thememory of the gun control.

Next the event processor determines at 414 whether a mode change hasbeen commanded, and if so, a new mode is entered at 416. The system maybe operated in the start-up, the manual, the off-line and the automodes. If no mode change has been commanded, the event processor at 418detects whether a new part data, for example, new preset of sprayparameters is being downloaded.

The second other group of data, stored in the gateway database withinthe nonvolatile flash EPROM 94 is referred to as "part data" and is datarepresenting spray parameters which are dependent on the particular partto be sprayed. Part data includes, for example, the preset number whichis the address or identifier associated with the particular record inthe database containing the presets, or values, of spray parametersassociated with that particular part; and the desired KV for theparticular spray gun connected to the gun control. For a corona typegun, this field defines a desired output voltage as a percentage of fullscale. For a tribo type gun, the field defines the desired minimumfeedback current in microamps. Other preset parameters are pattern airpressure, atomizing pressure and flow pressure as a percentage of fullscale which on the gun controls 38, 40, 42 is 100 psi. Also preset isthe On delay, that is, the number of encoder counts to wait after thepart reaches the pick off point and before the purge-on state begins;and the Off delay which specifies a number of encoder counts to continuespraying after the end of part is detected. If new part data, forexample, one or more new presets of spray parameters is beingdownloaded, the event processor at 420 updates the part data store, forexample, the preset spray parameter data table in the memory 116 of thegun control. Thereafter, the new preset parameters will be used.

To better understand the operation of the automatic mode of operation,reference is made to FIG. 12 in which powder spray guns 18, 20, 22, and24 are mounted in the spray booth 12. The part 14 is suspended from amoving conveyor 16, and an encoder 46 is mechanically coupled to theconveyor 16 to track the motion of the part 14 relative to the spraybooth. The encoder produces a fixed number of pulses or counts perrevolution, so that the rate at which encoder counts are produced is afunction of the linear speed of the conveyor 16. The conveyor 16indicates a number of graduations 15 which are illustrative of anincremental displacements of motion of the conveyor 16 represented bythe counts from the encoder 46. A plurality of photosensors 54 arelocated adjacent the entrance of the spray booth 12 in order to identifythe part entering the spray booth. It is readily apparent from anexamination of the part 14 that different spray guns will be required tobe triggered ON at different times depending on which portion of thepart 14 is passing in front of the spray gun. For example, the section 5of the part 14 will require powder spray guns 18, 20, 22, 24 bespraying. In contrast, section 6 of the part 14 will only require thatguns 18, 20, 24 be triggered. Further, section 7 requires only guns 18,20 and section 8 also requires guns 18, 20; but because of its change indepth from guns 18, 20, the preset spray parameters should be changed inorder to better coat section 8. Consequently, the part 14 is dividedinto four different part identifications 5, 6, 7, 8 which can berecognized by the states of the photosensors 54.

In setting up the mapping data table associating part identifications todifferent sets of presets in the gun controls for the respective guns18, 20, each part identification 5, 6, 7 is mapped to the same preset ofspray parameters. However, since part identification 8 is set back indepth and is subject to a Faraday caging effect in the internal cornerswhich may result in a poorer quality powder coating, the preset sprayparameters for section 8 may be changed to reduce the electrostaticcharge setting and increase the penetration of the powder spray cloudinto the part.

As previously described, the PPC 50 is connected to the encoder 46 andtransmits a part position signal across the network 44 to each of thegun controls 38, 40, 42 which is comprised of the current partidentification code being presented by the PLC and the current encodercount. Referring to FIG. 6, the event processor within each gun controldetects the encoder count at 422 and executes a track part routine 424illustrated in FIG. 7. Each gun control tracks the motion of the part 14through the spray booth 12. That tracking is implemented by a push downstack or queue that has a predetermined number of positions or slots,for example, 2048. As each encoder count is received by the gun control,the part identification associated with the encoder count is loaded inthe bottom of the stack or queue. With each successive encoder pulse,its associated part identification is loaded in the bottom of the stackor queue thereby pushing the previous part identification up one slot.Therefore, the queue is a first-in, first-out queue that tracks motionof the part 14 as it is transported by the conveyor 16. The purpose oftracking the conveyor is to determine when the part moves into theproximity of the spray gun as determined by the pick off point.Referring to FIG. 12, from the point 17 where the beginning of the part14 is detected, the part section 5 will move 12 conveyor counts into thespray booth to the pick off point 19 before it is in the proximity ofthe guns 18, 20, 22, 24 at which point, those spray guns are activated.

Referring to FIG. 7 which illustrates the details of the track partsubroutine, the first step of that process is to enter the partidentification in the queue at 470. As described above, generally, thepart identification will be loaded into the lowermost slot of the queue.However, situations may arise where the encoder count received by thegun control is not incrementally sequential with the prior count. Forexample, with a potential of 50 gun controls connected to thecommunications network 44, a send and acknowledge communicationsprotocol could represent excessive traffic on the network 44. Therefore,to reduce network traffic, the receipt of encoder counts by the guncontrols is not acknowledged to the gateway control. Consequently, ifthere is a poor connection in the system or the encoder count message isoverridden by a higher priority message, those occurrences will not bedetected as part of the communication protocol between the gatewaycontrol 56 and the gun controls 38, 40, 42. Therefore, as part of thequeue part identification subroutine 470, to detect missing encodercounts, the gun control compares the current encoder count with theprevious encoder count. If the comparison indicates that one or moreencoder counts are lost, the queue part identification subroutine 470will increment the queue a number of slots to compensate for the missingencoder counts. If the comparison indicates that the conveyor has movedin a reverse direction a significant magnitude, the queue partidentification step 470 will move the part identification in theopposite direction in the queue to simulate a reversal of motion of thepart within the spray booth. Further, if the queue part identificationsubroutine 470 detects a high number of missing encoder counts, an errormessage is generated. After the part identification has beenappropriately entered in the queue, a trigger subroutine 472 isexecuted. The trigger subroutine is executed several times throughoutthe track part subroutine and will be subsequently described.

Referring to FIG. 12, the pick off point is programmed as part of thegun data associated with the gun and is defined as the distance in termsof incremental displacements represented by each encoder count betweenthe location of a spray gun, for example, gun 18, and the location ofthe photodetectors 54. Consequently, in the current example, gun 18 is12 encoder counts from the photodetectors 54; and therefore, the pickoff point has a value of 12. The gun control will then continuouslymonitor the 12th slot in the queue to detect a part identification.Assuming there are no missing encoder counts, after 12 encoder counts,the part identification 5 is entered in the 12th slot of the queue; andthe track part subroutine at 474 detects that the 12th slot has changedfrom a zero to the part identification 5, that is, the beginning ofportion 5 of the process then executes the trigger subroutine 476 whichis illustrated in FIG. 8.

Generally, starting from an idle state, the cycle of operation of apowder spray gun will sequence through one or more of the followingsequential events: a On delay state, a purge ON state, and ON-partstate, an Off delay state, a purge OFF state, and a return to the idlestate. In any particular cycle, not all of those states must be used;and the cycle changes to accommodate part transitions Further,additional timing periods may be associated with the beginning or endingof any one of those states. Referring to FIG. 8, after the beginning ofthe part is detected at 474 in FIG. 7, a new part event is detected at504 which initiates the beginning of an On delay state 506. The amountof On delay is measured in terms of a programmed number of encodercounts; and therefore, the On delay state is a count event as detectedat 508. The encoder counts are counted from the beginning of the Ondelay state; and the process at 510 determines when that counterexpires. In the present case, the part identification 5 would have azero count On delay state; and therefore, the process at 512 would moveto 514 to begin a purge ON state and reset the On delay state. Duringthe purge ON state, which preferably is used with a tribo gun, acleaning, or purging fluid, for example, the pressurized atomizing air,is pumped through the spray gun itself to clean it of foreign materials.The duration of the purge ON state is defined and programmed in terms ofencoder counts. However, with part identification 5, the purge ON stateis zero; and the process passes through steps 508, 510, 512. At 516, theprocess moves to the ON part state at 518 while resetting the purge ONstate and then returns to FIG. 7.

To summarize, referring to FIG. 12, after the forward edge of theportion 5 of the part 14 moves 12 encoder counts past the detectors 54to the pick-off point in front of the spray guns 18, 20, 22, 24 theON-part state is initiated which causes the gun controls to read thepreset spray parameters that are associated with part identification 5;and the gun controls for guns 18, 20, 22, 24 begin spraying powder tocoat the part section 5 of the part 14. That powder coating processcontinues for two more encoder counts at which point the partidentification 6 enters the 12th slot of the queue in the gun controlsassociated with guns 18 and 20. At that point, the track partsubroutines running in those gun controls detects at 478 a new partidentification number in slot 12 of the queue. Therefore, the guncontrols associated with guns 18, 20 again execute at 479 the triggersubroutine of FIG. 8. The new part identification number signifies apart transition event at 520, and the ON-part state is initiated at 522which causes those guns to initiate a powder spraying process inaccordance with a set of spray parameters associated with partidentification 6. In the example of FIG. 12 the preset parameters forguns 18, 20 for part identification 6 may be the same as those for partidentification 5.

In contrast to the operation of gun controls associated with guns 18,20, the gun control associated with gun 22 detects at 480 of the trackpart subroutine (FIG. 7) that the 12th slot in its queue went to zero atthe same time that the other gun controls detected the partidentification 6. The process running in the gun control of gun 22 thenat 481 again executes the trigger subroutine of FIG. 8. The triggersubroutine at 524 detects the end of part event; and the gun controlassociated with gun 22 begins the Off delay state at 526. The Off delaystate is also an encoder count dependent event; and if it is zero orafter the event counter has expired, the subroutine moves throughprocess steps 508, 510, 512, 516 and 528 to begin the purge OFF state at530. The process then returns to FIG. 7 which in turn returns to theevent processor of FIG. 6. During the purge OFF state, a cleaning orpurging fluid, for example, with a corona gun, the pressurized atomizingair, may be pumped through the dispensing hose 30 and the spray gun topurge unsprayed powder from the hose and gun. With a tribo gun, purgingmay be accomplished by, for example, shutting off the powder and pumpingthe powder flow air through the dispensing hose and the gun and theatomizing air through the gun. When the event processor at 426 detectsthat the purge OFF timer has expired in the auto mode, the process at428 terminates the purge OFF state. If an encoder count is detected at422 in the next iteration through the event processor, the track partsubroutine 424 again executes the trigger subroutine 472 of FIG. 7. Asshown in FIG. 8, the trigger subroutine moves through steps 504, 524,520, 508 to 532 at which point the termination of the purge OFF state isdetected; and the gun is returned to its idle state at 534.

Referring to FIG. 6 the event processor subroutine provides severalother functions independent of the direct control of the powder coatingprocess. For example, if at 430 the event processor detects a conveyormessage from the gateway control, and if the gun control at 432determines that the message indicates that the conveyor has stopped, thesubroutine at 434 will initiate a purge OFF state and suspend spraying.If during a subsequent iteration through the event processor subroutine,the process detects a subsequent conveyor message at 430 and determinesat 432 that the conveyor is no longer stopped, the event processor at436 will reinitiate the state that was terminated at 434 and resumeprocessing the part.

As is typical with communications systems, the control system containsnumerous timers that require a periodic communication event. Forexample, as part of the on-line task in the initialization of thegateway control, a heart beat timer is started and requires that eachgun control send a heart beat message to the gateway control within apredetermined period of time, for example, 20 seconds. Therefore, eachgun control has a heart beat timer that times a predetermined period oftime, for example, 10 seconds and the event processor at 438 detects theexpiration of the 10 second heart beat timer and sends a heart beatmessage at 440 to the gateway control. Upon receipt of the heart beatmessage, the gateway control resets its 20 second heart beat timer andacknowledges receipt of the heart beat message to the gun control. Ifthe acknowledgement is not received, the event processor at 442 detectsthat the sending of the heart beat message to the gateway control failedand at 444, terminates the operation of the spray gun and initiates thegun control reset routine of FIG. 4. In addition to the above describedheart beat, the event processor contains a status timer, for example, aone second timer that after every one second sends a status message tothe gateway control which includes the current operational preset valuesof the gun control, for example, the gun current, various pressures,active preset number, gun mode, present trigger state, etc. Theexpiration of the status timer is detected at 438 within the eventprocessor subroutine, and that status message is forwarded at 440 to thegateway control.

The communication link between the PPC 50 and each of the gun controls38, 40, 42 is also continuously checked. The PPC 50 is required tocontinuously send an encoder count to each of the gun controlsindependent of whether the conveyor is moving. Therefore, even if theconveyor is stopped, the PPC will send the most recent partidentification and encoder count to each of the gun controls. Each ofthe gun controls has an encoder time out timer which is reset by thereceipt of an encoder count from the PPC 50. However, if the eventprocessor at 446 detects that the encoder timer has expired in the automode, the event processor at 448 sends an encoder time out fault messageto the gateway control and switches the gun control from the auto modeto the off-line mode.

The gun control also periodically reads the feedback signals from thepower amplifier 124 and powder flow and atomizing air transducers 130,132. The frequency at which the feedback signals is read is determinedby a feedback timer running within the gun control, and the eventprocessor at 450 detects when the feedback timer has expired. Inresponse thereto at 452, the event processor causes gun controlprocessor 106 by means of the A/D and scaling circuit 128 to read thecurrent being supplied by the KV generator 126 and produces an errorsignal in response to the current exceeding the alarm high or lowlimits. In addition, the gun control processor 106 checks whether thefeedback signals for the powder flow pressure, atomizing air pressureand pattern air pressure, if used, are in excess of their upper andlower limits, for example, plus or minus 5 psi of the preset value forthose parameters. If any of the limits are exceeded, the gun controlprocessor 106 provides the appropriate error signals to the gatewaycontrol 56.

In summary, in view of the foregoing detailed description it can now beappreciated that systems made in accordance with the present inventionwill include a distributed control architecture, as is preferablyprovided by a "NEURON CHIP" type processor with each gun control andassociated powder pump, wherein each processor is connected to acommunications network. In addition, some shared control element ispreferable. In this way, each spray gun is individually and optimallycontrolled in response to part identification and position data withminimal operator involvement. This provides a flexible and comprehensivecontrol system with less wiring.

While the invention has been set forth by a description of theembodiment in considerable detail, it is not intended to restrict or inany way limit the claims to such detail. Additional advantages andmodifications will readily appear to those who are skilled in the art.

For example, the configuration of the system control 34 that includesthe operator control 36, part position control 50, PLC 52 and gatewaycontrol 56 is a matter of design choice. The functions provided by thosevarious controls may be implemented with different configurations ofcontrols depending on the nature of the communications network 44, thespeeds of the processors within the various controls and other technicalconsiderations.

Further, the function of the photosensors 54 for detecting a physicalcharacteristic of the part may be implemented using other types ofproximity sensors or an imaging device. In addition, the function of theencoder 46 of providing increments of displacement of the moving partmay be implemented using other position transducers. Further, many ofthe functions determined by the measurement of encoder counts may alsobe determined by timers and vice versa. It will be appreciated thatother components within the various controls, for example, the flashEPROM 94 of the gateway control 56 to provide a nonvolatile memory maybe implemented with other known nonvolatile storage devices.

In addition, while electrical communication through wires is presentlycontemplated, "electrical communication" could also be through fiberoptic cables, infrared light, radio frequency, or other means by whichinformation can be transmitted between electrical devices.

It is understood therefore that the invention is not intended to belimited to the specific details shown and described and that departuresmay be made from such details without departing from the spirit andscope of the invention.

What is claimed is:
 1. A powder coating system for applying a powder coating to a part comprising:a plurality of powder spray guns disposed with respect to the part; at least one powder source supplying powder to said plurality of spray guns through a plurality of hoses connected between the at least one powder source and the spray guns; a plurality of flow regulators, each flow regulator varying the flow of powder through one of the hoses; a plurality of controls, each of the controls including a processor connected to a memory storing at least one set of spray parameters, each of the flow regulators being connected to one of the controls and each of the controls selecting the one set of spray parameters to vary the operation of the associated regulator and control the flow of powder through one of the hoses; and a communications network in electrical communication with the plurality of controls for providing data to the plurality of controls.
 2. The apparatus of claim 1 wherein the communications network is a local operating network.
 3. The apparatus of claim 2 wherein the communications network further comprises a node associated with each of the plurality of controls and in electrical communications with the local operating network.
 4. The apparatus of claim 2 further comprising motion controls associated with at least one of the spray guns for controlling motion of the one of the spray guns and wherein the local operating network provides electrical communications between the plurality of controls and the motion controls.
 5. The apparatus of claim 2 further comprising a sensor for detecting the presence of the part and wherein the local operating network provides electrical communications between the sensor and the plurality of controls.
 6. The apparatus of claim 2 further comprising a computer in electrical communications with the local operating network for providing, and the computer providing and/or receiving data relating to the spray parameters.
 7. The apparatus of claim 6 wherein the computer is an operator control.
 8. The apparatus of claim 6 wherein the computer is an external computer.
 9. A powder coating system for applying a powder coating to a part comprising:a powder source containing a supply of the powder; a plurality of flow regulators, one of the flow regulators being connected to the powder source; a plurality of powder spray guns, one of the powder spray guns receiving powder from the powder source; a plurality of controls, each of the controls including a processor connected to a memory storing at least one set of spray parameters, each of the controls being connected to one of the flow regulators and one of the powder spray guns and one of the controls causing the one of the flow regulators to vary the flow of powder to a respective spray gun as a function of the one set of spray parameters; and a communications network in electrical communication with the plurality of controls.
 10. The apparatus of claim 9 wherein the communications network further comprises a node in electrical communications with each of the plurality of controls and a local operating network. 